package chapter1.fundamentals.exercise;

/**
 * @author quanlinlin on 2018/11/2 16:57.
 * @version 1.0
 */
public class E_24 {

    public static void main(String[] args) {
        //int a = StdIn.readInt();
        //int b = StdIn.readInt();
        int a = 105;
        int b = 24;

        System.out.println(gcd(a, b));
    }

    private static int gcd(int a, int b) {
        System.out.printf("a:%d\tb:%d\n", a, b);
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }
}
